package com.supplychain.scm.core.dinger.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.io.Serializable;
import java.util.List;

@Data
@ConfigurationProperties(prefix = DingDingProperties.PREFIX)
public class DingDingProperties {

	/**
	 * 前缀
	 */
	public static final String PREFIX = "spring.dinger";

	/**
	 * 是否开启
	 */
	private boolean enabled;

	/**
	 * 日志级别
	 */
	private String level;

	/**
	 * 机器人配置
	 */
	private List<Ding> dings;

	@Data
	public static class Ding implements Serializable {
		private static final long serialVersionUID = -3965193131467935902L;
		/**
		 * token
		 */
		private String token;
		/**
		 * secret
		 */
		private String secret;
	}
}
